package com.hlhj.carview

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.google.gson.Gson

/**
 *NeverMore
 *2020/9/3
 **/
fun String.Toast(){
    android.widget.Toast.makeText(MyApp.myApp,this,android.widget.Toast.LENGTH_SHORT).show()
}

fun encode(x:Any): String? {
   return Gson().toJson(x)
}
fun inStringArray(key:String,array:Array<String>): Boolean {
    return array.contains(key)
}

fun ImageView.LoadtNet(url:String){
    Glide.with(MyApp.myApp).load(url).into(this)
}